import {inject, observer} from 'mobx-react';
import {Modal, Button} from "antd";
import {WeaLocaleProvider, WeaFormItem, WeaInput} from "ecCom";
const warning = Modal.warning;
const getLabel = WeaLocaleProvider.getLabel;

const formItemLayout = {
    labelCol: {span: 7},
    wrapperCol: {span: 17},
};

@observer
export default class Main extends React.Component {
    constructor(props) {
        super(props);
    }

    saveAuthCode = (val) => {
        const {secondAuthStore} = this.props;
        secondAuthStore.saveAuthCode(val);
    }

    render() {
        return (
            <div className="content">
                <WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@ur7gnc`} {...formItemLayout} label={getLabel(32896, "动态令牌")}>
                    <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@qimu94`} viewAttr={3} onChange={this.saveAuthCode}/>
                </WeaFormItem>
            </div>
        );
    }
}
